<?php
class single extends CI_Controller {
	
	public function index($type,$uid)
	{
		$this->show($type,$uid);	
	}
	
	public function show($type,$uid)
	{
		
		$result = array();
		$this->load->model($type,'',true);
		$this->blocks =  $this->$type->getFromID($uid);
		if ( count($this->blocks) > 0 ) {
			$this->load->View('header');
			$this->blocks[0]->type = $type;
			$this->load->view('MasonryBlocks',array('blocks'=>$this->blocks));
			$this->load->view('LoginBlock');
			$this->load->View('footer');
		}
		
	}
	
}